package com.worldtolearn.comment.dao;

import java.io.Serializable;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

import com.worldtolearn.comment.entity.Comment;
@Repository
public class CommentDAOImpl extends HibernateDaoSupport  implements CommentDAO,Serializable {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Autowired
	public void init(SessionFactory factory) {
	    setSessionFactory(factory);
	}
//	private JdbcTemplate jdbcTemplate;
	@Override
	public void addComment(Comment ct) {
		System.out.println("ctttctctt "+ct);
		getHibernateTemplate().save(ct);
	}

}
